<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <title>定制会员卡</title>
    <link rel="stylesheet" type="text/css" href="Assets/css/reset.css"/>
    <script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="Assets/plugins/FlexSlider/flexslider.css">
    <script type="text/javascript" src="Assets/plugins/FlexSlider/jquery.flexslider.js"></script>
    <script type="text/javascript" src="Assets/js/main.js"></script>
    <link rel="stylesheet" type="text/css" href="Assets/css/thems.css">
    <link rel="stylesheet" type="text/css" href="Assets/css/responsive.css">

    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

    <script language="javascript">

    </script>
</head>

<body>
<!--头部-->
<div class="head clearfix">
    <div class="logo"><a href=""><img src="Assets/images/logo.jpg" alt="信本财富"/></a></div>
    <div class="head_r">
        <div class="lang">
            <a href="">中文</a>|
            <a href="">English</a>
        </div>
        <ul class="nav clearfix">
            <li class="now"><a href="index.html">首页</a></li>
            <li><a href="product.html">课程管理</a></li>
            <li><a href="vip.html">会员管理</a></li>
            <li><a href="sig_in.html">签到管理</a></li>
            <li><a href="custom-made.html">定制会员卡</a></li>
            <li><a href="subbranch.html">场馆管理</a></li>
            <li><a href="staff.html">员工管理</a></li>
        </ul>
        <div class="nav_m">
            <span class="n_icon">&nbsp;</span>
            <ul>
                <li><a href="index.html">首页</a></li>
                <li><a href="about.html">关于信本</a></li>
                <li class="now"><a href="news.html">信本动态</a></li>
                <li><a href="product.html">信本业务</a></li>
                <li><a href="#">信本学院</a></li>
                <li><a href="#">社会责任</a></li>
                <li><a href="#">联系我们</a></li>
            </ul>
        </div>
    </div>
</div>
<!--头部-->
<!--幻灯片-->
<div class="banner">
    <div class="slider">
        <div class="flexslider">
            <ul class="slides">
                <li>
                    <a href=""><img src="Assets/upload/banner.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_a.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_b.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_c.jpg" alt="" /></a>
                </li>
                <li>
                    <a href=""><img src="Assets/upload/banner_d.jpg" alt="" /></a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--幻灯片-->
<div class="scd clearfix">
    <div class="scd_l">
        <div class="title"><span>会员卡管理</span></div>
        <ul class="s_nav">
            <li class="now"><a href="custom-made-add.html"><em>增加会员卡</em></a></li>
        </ul>
    </div>
    <div class="scd_r">
        <div class="s_title">

            <div class="pst">
                当前位置：
                <a href="">首页</a>>
                <a href="">会员卡管理</a>>

            </div>
        </div>
        <div class="scd_m">
            <div class="news" id="tbodyul">
                <dl class="clearfix">
                    <dt><a href=""><img src="Assets/upload/pic7.jpg" alt=""/></a></dt>
                    <dd>
                        <div class="title"><a href="">深圳信本财富投资</a></div>
                        <div class="des">深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富投资深圳信本财富......</div>
                        <button type="submit" class="btn btn-default"><a href="custom-made-update.html">修改</a></button>
                        &nbsp;&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
                        &nbsp;
                        <button type="submit" class="btn btn-default">删除</button>


                    </dd>
                </dl>


            </div>
        </div>
    </div>
</div>

</body>
</html>
<script>
    $(function () {
        var path = "/" + location.pathname.split("/")[1];
        $.get(path+"/memberQuery",function (list) {
            console.log(list+"=================")

            $.each(list,function (i,li) {

                console.log(li)

                var path = "/" + location.pathname.split("/")[1];
                $("#tbodyul").append(

                    '<dl class="clearfix">'+
                    '<dt><a href=""><img src='+path+'/'+li.memberimg+' alt=""/></a></dt>'+
                    '<dd>'+
                    '<div class="title">'+li.membername+'</div>'+
                    '<div class="des">类型:'+li.membertype+'</div>'+
                    '<div class="des">售价:'+li.memberprice+'</div>'+
                    '<div class="des">场馆:'+li.membershop+'</div>'+
                    '<button type="submit" class="btn btn-default" onclick="query2('+li.memberid+')">修改</button>'+
                    '&nbsp;&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;&nbsp;'+
                    '<button type="submit" class="btn btn-default" onclick="deleteMember('+li.memberid+')">删除</button>'+
                    '</dd>'+
                    '</dl>'


                );

            });

        },"json")



    });
    function query2(id){
        var toUrl = "custom-made-update.html?id="+id;
        window.open(toUrl);
    }

    function deleteMember(id){
        var path = "/" + location.pathname.split("/")[1];
        $.get(path+"/deleteMember",{"id":id},function (list) {
            var li= eval(list);
            console.log(li+"===============");
            if (li){

                window.location.href="custom-made.html"

            } else {
                alert("删除失败")

            }

        },"json");
    }

</script>